package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;


@Embeddable
public class NewsNewsQuestionPK  implements Serializable{
	@Basic(optional = false)
	@Column(name = "cid")
	private Integer cid;  
	@Basic(optional = false)
	@Column(name = "qid")
	private Integer qid;                   
	
	public NewsNewsQuestionPK(){
	}
    public NewsNewsQuestionPK(Integer cid,Integer qid){
		this.cid=cid;
		this.qid=qid;
	}
	public Integer getCid() {
		return cid;
	}
	public void setCid(Integer cid) {
		this.cid = cid;
	}
	public Integer getQid() {
		return qid;
	}
	public void setQid(Integer qid) {
		this.qid = qid;
	}
	
	@Override
	public int hashCode() {
	        int hash = 0;
	        hash += (cid != null ? cid.hashCode() : 0);
	        hash += (qid != null ? qid.hashCode() : 0);
	        return hash;
	}

    @Override
	public boolean equals(Object object) {
	    if (!(object instanceof NewsNewsQuestionPK)) {
	          return false;
	     }
	    NewsNewsQuestionPK other = (NewsNewsQuestionPK) object;
	     if ((this.cid == null && other.cid != null) || (this.cid != null && !this.cid.equals(other.cid))) {
	         return false;
	     }
	     if ((this.qid == null && other.qid != null) || (this.qid != null && !this.qid.equals(other.qid))) {
	         return false;
	     }
	     return true;
	}
	    
	@Override
    public String toString() {
        return "com.dp.vo.NewsNewsQuestionPK[cid=" + cid + ",qid="+qid+"]";
    }
	
	
}
